﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using MvcEngine.Core.Validation;
using MvcEngine.Core.Content;
using MvcEngine.Core.Website;
using MvcEngine.Core;
using MvcEngine.Core.Localization;
using MvcEngine.Mvc.Models.ViewModels;

namespace MvcEngine.Mvc.Models
{
    public class SiteItemViewModel: MvcEngineModel
    {
        public Guid Id { get; set; }

        [MvcEngineDisplayName("NameLabel")]
        [RequiredFieldValidator("$SiteNameRequiredValidator")]
        [LengthValidator("$SiteNameLengthValidator", 256)]
        public string Name { get; set; }

        [MvcEngineDisplayName("DescriptionLabel")]
        [LengthValidator("$SiteDescriptionLengthValidator", 256)]
        public string Description { get; set; }

        [MvcEngineDisplayName("PagesLabel")]
        [DropDownList("Pages", "Id", "Name")]
        public Guid DefaultPage { get; set; }

        [MvcEngineDisplayName("LoginPagesLabel")]
        [DropDownList("Pages", "Id", "Name")]
        public Guid? LoginPage { get; set; }

        [MvcEngineDisplayName("AccountPagesLabel")]
        [DropDownList("Pages", "Id", "Name")]
        public Guid? AccountPage { get; set; }

        [MvcEngineDisplayName("SkinsLabel")]
        [DropDownList("Skins", "Id", "Name")]
        public Guid Skin { get; set; }

        [MvcEngineDisplayName("RegistrationTypesLabel")]
        [DropDownList("RegistrationTypes", null)]
        public int RegistrationType { get; set; }

        [MvcEngineDisplayName("LanguagesLabel")]
        [DropDownList("Languages", "ShortName", "Name")]
        [RequiredFieldValidator("$SiteCultureRequiredValidator")]
        [LengthValidator("$SiteCultureLengthValidator", 256)]
        public string Culture { get; set; }

        [MvcEngineDisplayName("SiteHeaderTextLabel")]
        public string HeaderText { get; set; }

        [MvcEngineDisplayName("SiteFooterTextLabel")]
        public string FooterText { get; set; }

        [MvcEngineDisplayName("SiteEmailLabel")]
        public string Email { get; set; }

        [MvcEngineDisplayName("SiteSmtpUserNameLabel")]
        public string SmtpUserName { get; set; }

        [MvcEngineDisplayName("SiteSmtpPasswordLabel")]
        public string SmtpPassword { get; set; }

        [MvcEngineDisplayName("SiteSmtpServerLabel")]
        public string SmtpServer { get; set; }

        [MvcEngineDisplayName("SiteSmtpServerPortLabel")]
        public int SmtpServerPort { get; set; }


        public IList<Page> Pages { get; set; }

        public IList<Skin> Skins { get; set; }

        public IList<RegistrationType> RegistrationTypes { get; set; }

        public IList<LanguageInfo> Languages { get; set; }
    }
}
